﻿Imports System
Imports System.IO
Imports System.Data.OleDb
Imports System.Data
Namespace Arwani
    Partial Class Backend_UpdateSortOrder
        Inherits System.Web.UI.Page

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If (Session("ADMIN_USER") IsNot Nothing) Then
                If Request.Form("tableName") <> "" Then
                    Dim arwCon As New ArwaniController
                    Dim strQ As String = ""
                    strQ = "update " & Request.Form("tableName") & "  set sortorder=" & CInt(Request.Form("sortOrder")) & "  where " & Request.Form("whereID") & "=" & CInt(Request.Form("valueID"))
                    arwCon.ExecuteNonQuery(strQ)
                    Response.ContentType = "text/plain"
                    Response.Write("Sort Order Updated")
                    Response.End()
                Else
                    Response.Redirect("Default.aspx")
                End If
            End If

        End Sub
    End Class
End Namespace